package com.example.util;

import com.example.api.RedisApi;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class redistest {
    @Test
    public void  test(){
        ClassPathXmlApplicationContext ctx=
                new ClassPathXmlApplicationContext("springConfig.xml");
        RedisApi redisApi =(RedisApi) ctx.getBean("redisApi");
        redisApi.set("zhangsan","zs");
    }
}
